2026-09-22 · class-notes, tryhackme, networking, topologies, subnetting, arp, dhcp
Full class notes for TryHackMe Pre Security (2026 path) module 5, Intro to LAN: star, bus and ring topologies, switches and routers, subnetting, ARP and DHCP.
Class notes · TryHackMe Pre Security (2026 path) · Module 5, room 2: Intro to LAN
Quick reference: the short version of this room is the Intro to LAN cheat sheet, the second sheet in Module 5. It follows What is Networking?, and overlaps with the A+ lessons on network devices and addressing and with Networking for Sysadmins chapter 2, which goes deeper on ARP.
By the end of these notes you should be able to:
A topology is the shape of a network: how the devices are connected to each other. Three classic designs are worth knowing, because each trades cost against reliability in a different way.
STAR: every device has its own link to a central switch
PC PC
\ /
PC --- SWITCH --- PC
/ \
PC PC
BUS: every device taps the same backbone cable
PC PC PC PC
| | | |
term ===+=======+=======+=======+=== term
RING: devices form a loop and pass data round it
PC ----- PC
/ \
PC PC
\ /
PC ----- PC
In a star topology, every device has its own cable to a central device, usually a switch (or, historically, a hub). All traffic passes through that central device on its way to anywhere else.
This is by far the most common design today, because it is reliable and easy to grow. Adding a device means running one more cable to a free port. If one cable or device fails, only that device is affected.
The costs are real, though. A star needs more cabling than the other designs and a dedicated switch to plug it into, and the larger the network grows, the more maintenance and troubleshooting it demands. It also has one weak point: if the central switch fails, every device attached to it loses the network. In practice, that hardware is built to be reliable, and important networks use more than one switch.
A bus topology hangs every device off a single shared cable, the backbone. Think of leaves growing along one branch.
It is cheap and simple: one cable, no central equipment. But every device's traffic shares that one cable, so the network slows down badly when several devices are busy at once. Faults are hard to track down, because all the traffic follows the same path and any device could be the culprit. Worst of all, the backbone is a single point of failure. One break and nothing can communicate.
Note (beyond this lesson): a bus needs a terminator at each end of the backbone to absorb the signal, otherwise it reflects back down the cable and corrupts traffic. Bus networks were common in early Ethernet using coaxial cable, and are rare today.
A ring topology connects each device to the next, in a loop, with no central equipment and little cabling. Data travels around the loop in one direction, with each device passing it on until it reaches the right one.
Because there is only one direction of travel, faults are relatively easy to trace. The trade-off is efficiency: data may pass through many devices before arriving. Rings are less prone to the bottlenecks of a bus, because much less traffic is in flight at once, but a single cut cable or failed device breaks the whole ring.
Correction: the room calls a ring "also known as token topology", and says a device only forwards another device's data when it has none of its own to send. Those describe token passing, a method used on some ring networks (notably IEEE 802.5 Token Ring and FDDI), not the topology itself. With token passing, a small message called a token circulates, and a device may only transmit while it holds the token. The rest of the time it simply repeats frames onward. A ring is the shape; token passing is one way of controlling who talks.
| Star | Bus | Ring | |
|---|---|---|---|
| Central equipment | Switch or hub | None | None |
| Cabling needed | Most | Least | Little |
| Cost | Highest | Lowest | Low |
| Scales well | Yes | No | Poorly |
| Bottlenecks | Rare | Common | Uncommon |
| Single point of failure | The central device | The backbone cable | Any cable or device |
| Troubleshooting | Harder as it grows | Hard | Easier |
| Used today | Almost everywhere | Rarely | Rarely |
A small architecture firm is fitting out a new office for 30 staff, with printers and IP phones.
The answer is almost always a star, which is why a switch in a cupboard is what you find in practically every office.
A switch is a dedicated device that joins many other devices, such as computers, printers and anything else with an Ethernet port. Each device plugs into one of the switch's ports, and switches come with port counts of 4, 8, 16, 24, 32 or 64, so a business, school or similar-sized network can connect everything in one place.
Switches are far more efficient than hubs (or repeaters), the devices they replaced. A hub repeats every incoming frame out of every other port, so all the traffic reaches all the devices. A switch keeps track of which device is on which port, so it sends each frame only to the port where the destination lives. That cuts network traffic dramatically.
Note (beyond this lesson): the switch learns this by reading the source MAC address of every frame it receives and noting the port it arrived on, storing the pairs in a MAC address table. Traffic to an address it hasn't learned yet, and broadcast traffic, still goes to every port.
Switches and routers can be connected to each other, and connecting them in more than one way adds redundancy: if one path fails, another is available, and the network keeps running.
Correction: the room says redundancy costs performance, because packets take longer routes. That isn't quite how it works. On a layer 2 network, loops would flood the network with endlessly circling frames, so the Spanning Tree Protocol blocks the redundant links until a failure happens, meaning the backup path carries nothing until it is needed. Between routers, routing protocols normally pick the best available path, and only use a longer one when the best is gone. The longer path may be slower, but that is the failure case, not the everyday one.
A router connects networks and passes data between them, a process called routing. Routing works out a path across one or more networks so that data reaches its destination.
Routing matters most when there are several possible paths between two points. A router chooses which one to use, and can choose again when a path becomes unavailable.
Subnetting means dividing a network into smaller networks inside it. The room's analogy is cutting a cake: there is only so much of it, and you decide who gets which slice.
The usual reason is organisational. A business has departments, such as accounting, finance and human resources, and network administrators use subnets to give each its own part of the network, just as an office gives each its own floor or corridor.
An IPv4 address has four octets. A subnet mask is written the same way, four numbers of 0 to 255 making 32 bits in total, and it marks which part of an address identifies the network and which part identifies the host. A typical mask is 255.255.255.0.
At home, one subnet is plenty: a 255.255.255.0 mask leaves room for 254 devices, and few homes have that many. Offices, with their PCs, printers, cameras and sensors, are where subnetting earns its keep.
| Type | What it identifies | Example |
|---|---|---|
| Network address | The start of the network; it names the network itself, rather than any device | 192.168.1.0 |
| Host address | One device on that network | 192.168.1.100 |
| Default gateway | The device that forwards traffic to other networks | 192.168.1.254 |
Any traffic for an address outside the local network (anything not on 192.168.1.0, in this example) is sent to the default gateway. A gateway can use any host address, but by convention it takes the first or the last one, .1 or .254.
Correction: the room's table explains the host address with "a device will have the network address of 192.168.1.1", which mixes up the two rows. A host address identifies a device, such as
192.168.1.100; the network address,192.168.1.0, identifies the network and is never given to a device.
Note (beyond this lesson): there is a fourth special address. The last address in the range,
192.168.1.255here, is the broadcast address, used to reach every device on the subnet at once. That is why a255.255.255.0network has 256 addresses but only 254 usable ones: the first and last are reserved.
A device has the address 192.168.1.100 and the mask 255.255.255.0.
192.168.1.0.192.168.1.1 to 192.168.1.254, which is 254 usable addresses.192.168.1.255.192.168.1.1 or 192.168.1.254.192.168.1.50 is on the same network, so traffic goes straight to it. A server at 192.168.2.50 is not, so traffic goes to the gateway.Note (beyond this lesson): the room leaves the arithmetic of subnetting for later. This example shows where the numbers come from, for when you meet it.
The café in the room's example wants staff devices and public Wi-Fi kept apart, and has only 192.168.1.0/24 to work with. Changing the mask from 255.255.255.0 to 255.255.255.128 borrows one bit from the host part and makes two networks:
| Subnet | Network address | Host range | Broadcast | Usable |
|---|---|---|---|---|
| Staff | 192.168.1.0 |
192.168.1.1 to 192.168.1.126 |
192.168.1.127 |
126 |
| Public | 192.168.1.128 |
192.168.1.129 to 192.168.1.254 |
192.168.1.255 |
126 |
Each half needs its own default gateway, and traffic between the two halves has to pass through a router, which is exactly where the café can block the public side from reaching the till systems.
The room lists three benefits: efficiency, security and full control. The security one is the easiest to see. A café typically runs two networks: one for staff, tills and back-office equipment, and one as a public hotspot for customers. Subnetting keeps the two apart while both still reach the internet, so a customer's laptop cannot wander into the till system.
Efficiency comes from keeping local traffic, especially broadcasts, inside a smaller group of devices. Control comes from being able to apply different rules, and different filtering, to each subnet.
A device has two identifiers: an IP address and a MAC address. The Address Resolution Protocol (ARP) is what links them. When a device knows the IP address it wants to reach on its local network, ARP finds the MAC address that goes with it, so the data can actually be addressed and sent.
Correction: the room describes ARP as "allowing devices to identify themselves on a network" and as associating a device's own MAC address with its IP address. ARP is really a lookup of other devices: a host asks which MAC address owns a given IPv4 address, and uses the answer to address its traffic.
Every device keeps a store of what it has learned, called the ARP cache, which holds the IP-to-MAC pairings of other devices on the network. ARP uses two messages to fill it:
The requester stores the pairing in its cache, so it doesn't have to ask again for a while.
PC-A 192.168.1.50 PC-B 192.168.1.100
wants to reach 192.168.1.100
| |
| ARP request, broadcast to every host |
| "who has 192.168.1.100?" |
|--------------------------------------->|
| |
| ARP reply, sent only to PC-A |
| "that's me, and here is my MAC" |
|<---------------------------------------|
| |
PC-A's ARP cache now holds:
192.168.1.100 -> a4:c3:f0:85:ac:2d
Note (beyond this lesson): ARP only ever resolves addresses on the local network. For anything further away, the device looks up the MAC address of its default gateway instead, and lets the router take it from there. ARP is also IPv4-only: IPv6 does the same job with Neighbor Discovery.
Any machine will show you what ARP has learned. On Linux:
ip neigh show # or: arp -a
192.0.2.1 dev eth0 lladdr 02:fc:00:00:00:05 REACHABLE
On Windows, arp -a or Get-NetNeighbor shows the same pairings.
192.0.2.1 has the MAC address 02:fc:00:00:00:05, and the entry is current (REACHABLE).An IP address can be typed into a device by hand, but most addresses are handed out automatically by a DHCP server (Dynamic Host Configuration Protocol). When a device joins a network without a manually configured address, it and the server exchange four messages, remembered as DORA:
| Step | Message | What it means |
|---|---|---|
| 1 | DHCP Discover | The device asks whether any DHCP server is out there |
| 2 | DHCP Offer | A server replies with an address the device could use |
| 3 | DHCP Request | The device says it wants that address |
| 4 | DHCP Acknowledge (ACK) | The server confirms, and the device starts using the address |
Client, no IP address yet DHCP server
| |
| 1. DISCOVER: is there a DHCP server? |
|-------------------------------------------->|
| 2. OFFER: you could use 192.168.1.50 |
|<--------------------------------------------|
| 3. REQUEST: yes please, I'll take it |
|-------------------------------------------->|
| 4. ACKNOWLEDGE: it's yours, with a lease |
|<--------------------------------------------|
| |
The client can now use 192.168.1.50.
Note (beyond this lesson): the address comes with a lease, a period after which the device must ask to keep it. The first messages are broadcast, because the device has no address yet, and the server also supplies the subnet mask, default gateway and DNS servers at the same time.
192.168.1.0), host addresses name devices (192.168.1.100), the default gateway leads off the network (.1 or .254), and the last address is the broadcast.| Term | Meaning |
|---|---|
| ARP | Address Resolution Protocol: finds the MAC address that owns a local IPv4 address |
| ARP cache | A device's stored list of IP-to-MAC pairings |
| Backbone | The single shared cable in a bus topology |
| Broadcast address | The last address in a subnet, which reaches every device on it |
| Bus topology | A design where all devices share one backbone cable |
| Default gateway | The device traffic is sent to when the destination is on another network |
| DHCP | Dynamic Host Configuration Protocol: hands out IP settings automatically |
| DORA | The four DHCP messages: Discover, Offer, Request, Acknowledge |
| Host address | An address identifying one device on a subnet |
| Hub | An older device that repeats every frame out of every port |
| Lease | The period for which a DHCP address is valid |
| Network address | The address identifying a subnet itself, never given to a device |
| Redundancy | Extra paths or equipment so a failure doesn't stop the network |
| Ring topology | A design where devices form a loop and pass data around it |
| Router | A device that connects networks and passes data between them |
| Routing | Working out the path data takes across networks |
| Star topology | A design where every device connects to a central switch |
| Subnet mask | The 32-bit value marking which part of an address is the network |
| Subnetting | Splitting a network into smaller networks |
| Token passing | A method where only the device holding a token may transmit |
192.168.1.100 with a mask of 255.255.255.0: give the network address, the usable host range and the broadcast address.192.168.1.0; hosts 192.168.1.1 to 192.168.1.254; broadcast 192.168.1.255. That is 254 usable addresses..1 or .254 in a 255.255.255.0 network. Any host address would work.